<ion-view view-title="订单详情">
    <ion-nav-buttons side="left">
        <back-button></back-button>
    </ion-nav-buttons>
    <ion-content ng-class="{'has-loading': isOffline}">

        <ion-refresher pulling-text={{PULLING_TEXT}} pulling-icon="" refreshing-text={{REFRESHING_TEXT}}
                       on-refresh="doRefresh()"></ion-refresher>

        <div class="proc">
            <ol ng-if="param.isFailureOrder && failureOrder.buyOrSell == '0'">
                <li></li>
                <li class="lit"><i class="icon_type">买</i>
                    <h2>已提交购买订单 {{failureOrder.prod_name | defString}}</h2>
                    <p>购买金额 {{failureOrder.entrust_balance | defNumber:2}}元</p>
                    <p>提交时间 {{failureOrder.entrust_time | defDateString : 2}}</p>
                </li>
                <li class="lit"><i class="icon_scrap"></i>
                    <h2>订单状态：废单</h2>
                    <p>原因：<ion-spinner ng-show="isLoadingPayResult"></ion-spinner>{{pay_result}}</p>
                </li>
            </ol>
            <ol ng-if="param.isFailureOrder && failureOrder.buyOrSell != '0'">
                <li></li>
                <li class="lit"><i class="icon_type">卖</i>
                    <h2>已提交卖出订单 {{failureOrder.prod_name | defString}}</h2>
                    <p>购买金额 {{failureOrder.entrust_balance | defNumber:2}}元</p>
                    <p>提交时间 {{failureOrder.entrust_time | defDateString : 2}}</p>
                </li>
                <li class="lit"><i class="icon_scrap"></i>
                    <h2>订单状态：废单</h2>
                    <p>原因：<ion-spinner ng-show="isLoadingPayResult"></ion-spinner>{{pay_result}}</p>
                </li>
            </ol>

            <ol ng-if="!param.isFailureOrder && orderDetail.buyOrSell == '0' && !orderDetail.isSpecialBuyOrder">
                <li></li>
                <li class="{{orderDetail.trade_class}}"><i class="icon_type">买</i>
                    <h2>已提交购买订单 {{orderDetail.prod_name | defString}}</h2>
                    <p>购买金额 {{orderDetail.entrust_balance | defNumber:2}}元</p>
                </li>
                <li class="{{orderDetail.profit_start_class}}"><i class="icon_calculationIncome"></i>
                    <h2>开始计算收益</h2>
                    <p>{{orderDetail.profitStartDate | defString}}</p>
                </li>
                <li class="{{orderDetail.profit_show_class}}"><i class="icon_dispIncome"></i>
                    <h2>确认购买　显示收益</h2>
                    <p>{{orderDetail.profitShowDate | defString}}</p>
                </li>
            </ol>

            <ol ng-if="!param.isFailureOrder && orderDetail.buyOrSell == '0' && orderDetail.isSpecialBuyOrder">
                <li></li>
                <li class="{{orderDetail.trade_class}}"><i class="icon_type">买</i>
                    <h2>已提交购买订单 {{orderDetail.prod_name | defString}}</h2>
                    <p>购买金额 {{orderDetail.entrust_balance | defNumber:2}}元</p></li>
                <li class="{{orderDetail.prod_begin_class}}"><i class="icon_calculationIncome"></i>
                    <h2>{{orderDetail.entrust_status == 7 ? "部分确认成功" : "确认购买份额"}} 开始计算收益</h2>
                    <p ng-bind-html="orderDetail.prodBeginDate"></p>
                    <p ng-if="orderDetail.entrust_status == 7 && orderDetail.deal_share">确认成功：{{orderDetail.deal_share}}份</p>
                    <p ng-if="orderDetail.entrust_status == 7">确认失败资金将在5个交易日内退回到您的{{orderDetail.pay_account ? "银行卡" : "保证金账户"}}，具体到账时间以实际为准。</p>
                </li>

            </ol>

            <ol ng-if="!param.isFailureOrder && orderDetail.buyOrSell != '0'">
                <li></li>
                <li class="{{orderDetail.trade_class}}"><i class="icon_type">卖</i>
                    <h2>已提交卖出订单 {{orderDetail.prod_name | defString}}</h2>
                    <p>卖出份额 {{orderDetail.entrust_balance | defNumber:2}}份</p>
                    <p>提交时间 {{orderDetail.entrust_time | defDateString : 2}}</p>
                    <p>赎回到账金额以基金公司或管理公司计算的实际到账金额为准</p></li>
                <li class="{{orderDetail.redeem_show_class}}"><i class="icon_dispIncome"></i>
                    <h2>卖出到账时间</h2>
                    <p>{{orderDetail.redeemShowDate | defString}}前</p>
                    <p>到账至：{{orderDetail.bank_name }} {{orderDetail.pay_account}}</p></li>
            </ol>
        </div>
    </ion-content>
</ion-view>